<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="script/base.css"/>
    <link rel="stylesheet" type="text/css" href="script/home.css"/>
    <link rel="stylesheet" type="text/css" href="script/city.css">
    <script src="../jquery/jquery-3.4.1.js"></script>
    <script type="text/javascript" src="script/home_ban.js"></script>
    <script type="text/javascript" src="script/eg_top_search.js"></script>
    <script type="text/javascript" src="script/city.js"></script>
    <script type="text/javascript" src="script/snncar.js"></script>
    <script type="text/javascript" src="script/lg_reg.js"></script>
    <script type="text/javascript" src="script/index.js"></script>
    <script type="text/javascript" src="script/address.js"></script>
    <script type="text/javascript" src="script/3c-menu.js"></script>
    <script type="text/javascript" src="script/jquery-1.js"></script>

   <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
   <script src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../normal/Normalize.css">
    <script type="text/javascript" src = "../bootstrap/js/bootstrap.min.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .navigate{
            width: 100%;
            height: 5%;
            background-color: #F5F5F5;

        }

        .picture{
            width: 100%;
            height: 45%;


        }

        .article{
            width: 100%;
            height: 45%;


        }
        .bottom{
            width: 100%;
            height: 5%;
            background-color: #444444;

        }
        .userInfo{
            width: 225px;
            display: inline-block;
        }


        .div1{
            width: 100%;
            margin: 20px auto;
            clear: both;
        }
        .div1 .news{
            width: 100%;
            height: 320px;
        }
        .news img{
            width: 500px;
            height: 300px;
            float: left;
        }
        .news ul{
            list-style: none;
            float: left;
            margin-left: 10px;
            margin-top: 0px;
            font-size: 18px;
        }
        .news ul li a {
            color: #444444;
            line-height: 50px;
        }

        /*轮播图*/
    </style>
</head>


<body class="container" style="height: 550px">
<!--导航栏-->
<div class="container" style="background: #1E9FFF;width: 100%;height: 65px">
    <div>

        <img src="../2-post/images/logo.png" alt="" class="layui-circle"
             style="height: 60px;width: 80px;margin-top: 10px">
        <span style="font-size: x-large;color: #0C0C0C;font-weight: bolder;margin-top: 10px">爱车论坛</span>
        <a href="../cln/jsp/car.jsp">
            <span style="font-size: x-large;font-weight: bolder;color: #B1E1FF;margin-left: 50px;margin-top: 20px">去看车</span></a>
        <a href="../2-post/post.html">
            <span style="font-size: x-large;font-weight: bolder;color: #B1E1FF;margin-left: 30px">去看帖</span>
        </a>
        <!--<li class="layui-nav-item" style="margin-left: 50px;list-style: none;display: inline" id="first">-->


        <ul class="newul" style="margin-top: -60px">

            <li style="float: right;margin-top: -20px;height: 95px;line-height: 95px">
                <a href="../4_user/personself/index.html">
                    <span style="font-size: medium;color: #B1E1FF">个人中心</span>
                </a>
            </li>


            <li style="float: right;margin-top: -20px;margin-right: 40px;height: 95px;line-height: 95px">
                <a href="../4_user/personself/index.html" class="noLog">
                    <span style="font-size: medium;color: #B1E1FF" class="noLog">登录</span>
                </a>

                <a href="" class="Log">
                    <span style="font-size: medium;color: #B1E1FF" class="Log">退出登录</span>
                </a>
            </li>

            <li style="float: right;margin-top: -20px;height: 95px;line-height: 95px">
                <a href="../4_user/personself/index.html" class="regist">
                    <span style="font-size: medium;color: #B1E1FF" class="regist">注册</span>
                </a>

                <a href="../4_user/personself/index.html" class="userInfo">
                    <img class="userImg" style="width: 50px;height: 50px">
                    <span style="font-size: medium;color: #B1E1FF;" class="userName"></span>
                </a>
            </li>

        </ul>
    </div>
</div>
</div>
<!--导航栏-->

<script type="text/javascript" src="script/jquery.js"></script>


<!--轮播图-->
    <div id="picture" name="picture" class="picture">

        <div id="slidershow" class="carousel slide" data-ride="carousel" data-pause = "hover" data-wrap="true" style="margin-top: 5rem; width: 90%;height: 100%; margin-left:auto; margin-right:auto;">
            <!-- 设置图片轮播的顺序 -->
            <ol class="carousel-indicators">
                <li class="active" data-target="#slidershow" data-slide-to="0"></li>
                <li data-target="#slidershow" data-slide-to="1"></li>
                <li data-target="#slidershow" data-slide-to="2"></li>
            </ol>
            <!-- 设置轮播图片 -->
            <div class="carousel-inner">
                <div class="item active">
                    <a href="3_showpost.html?data=33"><img src="images/car%20(2).png" alt="" width=""></a>
                </div>
                <div class="item">
                    <a href="3_showpost.html?data=34"><img src="images/115.jpg" alt=""></a>
                </div>
                <div class="item">
                    <a href="3_showpost.html?data=35"><img src="images/跑车2.jpg" alt=""></a>
                </div>
            </div>
            <a class="left carousel-control" href="#slidershow" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left"></span>
            </a>
            <a class="right carousel-control" href="#slidershow" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right"></span>
            </a>
        </div>

        <script type="text/javascript">
            $(function(){
                $("#slidershow").carousel({
                    interval:3000
                });
                $("#slidershow a.left").click(function(){
                    $(".carousel").carousel("prev");
                });
                $("#slidershow a.right").click(function(){
                    $(".carousel").carousel("next");
                });
            });
        </script>


    </div>


<!--轮播图-->

    <div class="menucar">


    </div>

    <div id="article" name="article" class="article" >

        <!--新热帖-->
        <div class="div1">
            <h2>精选新闻</h2>
            <div class="news">
                <img src="./img/news.jpg">
                <ul>
                    <li> <a href="https://zhuanlan.zhihu.com/p/151861495" id="hot1">2020年全球汽车零部件供应商百强榜：上榜中国企业有这些</a> </li>
                    <li> <a href="https://www.zhihu.com/question/403179985/answer/1309097351" id="hot2">如何看待神龙汽车将引入欧宝品牌，欧宝汽车重新进入中国市场？</a> </li>
                    <li> <a href="https://zhuanlan.zhihu.com/p/151742420" id="hot3">当年近40万的斯巴鲁森林人，如今二手只要几万，这车你敢要吗？</a> </li>
                    <li> <a href="https://www.zhihu.com/question/403686853/answer/1304798578" id="hot4">哪个汽车品牌的梗最多?</a> </li>
                    <li> <a href="https://zhuanlan.zhihu.com/p/150762179" id="hot5">沃尔沃XC40：看配置啧啧称叹，报完价喜上眉梢，提三缸连连摇头</a> </li>
                    <li> <a href="https://www.zhihu.com/question/403720609/answer/1305547670" id="hot6">影响汽车销量的因素都有哪些？</a> </li>
                </ul>
            </div>
        </div>

        <div class="div1">
            <h2>精选帖子</h2>
            <div class="news">
                <img src="./img/tiezi.jpg">
                <ul>
                    <li> <a href="3_showpost.html?data=18" id="hot7">蓝色多瑙河的忧伤，再见</a> </li>
                    <li> <a href="3_showpost.html?data=19" id="hot8">XCAR文创官方旗舰店618大促开启</a> </li>
                    <li> <a href="3_showpost.html?data=20" id="hot9">嘉手纳</a> </li>
                    <li> <a href="3_showpost.html?data=21" id="hot10">与君同行，天涯路不远，感谢A3的四年相伴</a> </li>
                    <li> <a href="3_showpost.html?data=28" id="hot11">西部魔影</a> </li>
                    <li> <a href="3_showpost.html?data=30" id="hot12">我不是“样子货”——试驾长安UNI-T</a> </li>
                </ul>
            </div>
        </div>
        <!--新热帖-->

    </div><!--position: absolute;bottom:-500px;width: 75%;-->
    <div id="bottom" name="bottom" class="bottom" style="background: #1E9FFF;text-align:center;position: absolute;bottom:-500px;width: 77%;">
        <div class="copyright"style="background: #1E9FFF">
            <div class="cent" style="text-align: center;color: white"> Copyright © 2016-2017, snncar.com,All Rights Reserved 皖ICP备16022456号-1</div>
        </div>
    </div>
    </div>


<script>
    $.ajax({
        url: '/forum/user/getUserInfo',
        type: 'get',
        dataType: 'json',
        success: function (data) {
            if (data.state == '0') {
                //alert("登陆失败");
                $('.noLog').show();
                $('.Log').hide();
                $('.userInfo').hide();
                $('.regist').show();
            } else if (data.state == '200') {
                // 登录了
                var parm = "userName=" + data.data.userName;
                //alert("登陆成功");
                $.ajax({
                    url: "/forum/usercenter/selectByUsetName",
                    data: parm,
                    type: "post",
                    success: function (data) {
                        $('.regist').hide();
                        $('.userInfo').show();
                        $('.userImg').attr("src", data.userPhoto);
                        $('.userName').text(data.userName);
                        $('.noLog').hide();
                        $('.Log').show();
                    }
                })
            }
        }
    })


    function qing() {
        alert("请先去登录")
    }

    function layout() {
        // 退出登录


    }
</script>

</body>
</html>
